I'm going to keep a running total of what gets blocked in Pico-8 or cannot be accessed and - as access is desirable, I'll put it as a task to add to Clipmaster so it can be run in Pico-8. So not now but this thread will get updated and often.
The two commands import()
and export()
do not even work online.
The command, ls
and dir
(same command) do not do anything in code, I remember a time they used to work, however. I could add that to Clipmaster, give you a proper directory with extensions, file sizes, etc.
There is no sortarray()
command. Blitz has a very fast and robust internal sort routine. This could be added to Pico-8.
** There are no large integers, not easily. So, yeah Blitz could dip down and give us quadruple floating point accuracy or internal 64-digit integers. I know we need this ! :D
There is no loadtext()
or savetext()
This would be quite easy to add to Pico-8.
There is no deletefile()
command. While not very useful as you can only use printh()
to save to new text files, it would be useful if it would check and only have it work for .txt
files.
There is no inputh()
where you can read from a text file directly to a variable or array. This would be useful to have and could be done.
... many ideas ... should keep me busy for a-while.
Having seen other Pico-8 carts making use of external programs that are not pico-8 got me to thinking:
"Can this be done with Blitz ?"
Yes it can. Having decided to use the clipboard as my driver, I can do all kinds of interesting things, not just audio. And it doesn't even need to be in the same directory as your Pico-8 program. Although when you bundle your program as a final EXE, you can consider doing so.
To download my Clipmaster, required for this example, use the following address from Google Drive:
https://drive.google.com/file/d/1wUFty36AAHdKVNwHfMMYHKUOL25xKtXJ/view?usp=sharing
Click the down-facing arrow in the top-right-hand corner of the screen, don't clip Zip Extractor. Use 7zip to unpack if need be. Nice Freeware for unpacking ZIP files.
https://www.7-zip.org/a/7z2107-x64.exe
Run the program from there. Clipmaster 01-08-22.exe
With the EXE running, In this particular cart, press 🅾️ to play a unique sound effect that is impossible for regular pico-8 to play. And press ❎ to jump to my main website, all controlled inside Pico-8. See the source.
While it's still pretty primitive, it does open the option for useful items such as, in this case, playing audio sound effects such as WAV and OGG, even music, and a webpage launcher.
Likely there can be many more tasks and things that could be added to it, send me some suggestions and I'll see what can be coded, with your credits for the suggestion if included. :)
With the EXE running, In this particular cart, press 🅾️ to play a unique sound effect that is impossible for regular pico-8 to play. And press ❎ to jump to my main website, all controlled inside Pico-8. See the source.
From there, as long as you are running the cart in immediate mode, from EXE, or from Splore, it should work just fine. You can test it Online but must press CTRL+V each time, rather defeating the purpose of it. In immediate, EXE, or Splore, you won't need to though.
If there's interest, I should be able to add channel ability so you could fade music in on a channel and fade it out just as neatly. printh("@mus fi 01 logo.ogg","@clip")
which would fade in the music logo.ogg
and record its ID on channel 01. So to fade it out you could use printh("@mus fo 01","@clip")
Once you have Clipmaster running, to shut it down select it and press the Q key to exit.
This is exciting territory for me. I will be working here especially determining how BLITZ can assist with data files, load/save/update/delete. I'll limit the system to work only with .TXT and .PNG, nonetheless this opens interesting data opportunities that Pico-8 cannot follow.
As always if you have any questions or comments, please feel free to add them below.
This is my first game on the Pico-8. It took around 10 hours to complete. I learned lots of Lua in the process! :)
Any comments and suggestions are welcome.
Enjoy!
There are multiple issues I can't seem to figure out such as:
Why isn't the text coming up during the "cutscene" unless I manually set the state="cutscene"
I can't change the spawn point after the cutscene
why do I need to talk to piggy twice after I collect all his apples
I think I'm somehow setting the text on the screen to inactive and I'm not sure how
~Any and all help is greatly appreciated thanks!~
Hi everybody,
Here is my first cart, a version of Conway's Game of Life.
I hope you'll like it :)
This is a small work-in-progress demo thingy that tries to imitate the way special stages in the first Sonic game work.
Is very unfinished and probably very buggy.
Changelog:
Current version:
- Added the special stage music, as composed by Gruber.
- Modified the check for whether the character is in the air by only checking sensors that are close to the ground.
- Fixed a rounding bug that resulted in in-air checks failing half of the time on walls facing two of the four directions.
- Debug functionality: the background is changed from blue to purple whenever the main character is in the air.
Version 2:
- Replaced manual scrolling with automatic one
- Implemented the R block functionality
- Made it possible to move the character with the directional pad (slower in air than on ground).
Version 1:
Press X! (Also try holding it...)
About
Chick'n'Doggo is a game I made as part of the GMTK Game Jam 2021 using Pico-8. This is an updated version with some minor fixes, mostly regarding collision as well as some slightly adjusted controls (try holding the button). There's still more to be done, including the, perhaps not so minor, flaw of missing sound, so this version may be updated in the future.
1.13 Update
1.12 Update
1.11 Quickfix
About
Pakupaku Maze is a dungeon crawler, starring a legendary hero who was cursed by the evil demons to become a yellow circular blob that is unable to leave any room unless he eats all the cookies that are on the floor. Alternatively, you might say it's a Pac-Man clone.
The game's based on an idea I had several years ago, what if Pac-Man can leave this maze and explore other areas. It was a pipe dream at the time, but now I can make it and see how it turns out. The entire game is made of 30 screens, and there is one key and four exits which lead to different endings. Don't worry, the key will work on any door. The game will save four high scores for each ending.
There's only one ghost, and this ghost isn't as smart as the original Pac-Man ghosts because I wrote its AI. I was too confused reading about A* and felt it could bog me down for days if not weeks, so I prioritized finishing the game with what I can write. I thought hard about adding a second ghost, but having a second ghost would crowd the screen too much and make the game too difficult.
Player's starting location is randomly chosen among 5 possible options, which I hope would extend the game's expiry date. I'm quite pleased with the end result here, and it's my first game that's not built off from a tutorial project. One day I'll do a Pac...no, Paku-paku Roguelike with randomly generated mazes...
And yes, it's possible for Pac-..no, Paku-Paku to go transgender during the game. Well, there's an item that puts a bowtie to make it look like Ms Pac-Man.
On a fresh boot of pico-8, this glitchy grid effect happens exactly once, the first time that secret colors are used in a screen palette. Then never again.
I discovered this in my latest cart, and was wondering if this is an intentional indicator of "hardware mode change", or a bad sign that something is going seriously wrong. The starting palette of this cart uses only normal 0-15 colors, as does the "raw" palette you see when you press up. However, every other palette will show this glitch once for about 0.5 seconds, before the screen returns to normal. Re-running the cart does not show it ever again, until you reboot pico-8 completely.
Using if(pi==3) poke(0x5f2e,1) stop() poke(0x5f2e,0)
at the end of the _draw function means that the effect will happen for the same amount of time without any game code running at all, which makes me think that this visual glitch is intentional. Note also that without the poke to make the screen palette persist in the editors, there is no glitch effect, likely because it doesn't flip() with secret colors active. Any idea why this is happening, @zep?
Hello there!
Here's my first PICO-8 project, Flap Evolved. It's a really terrible Flappy Bird clone, but it is playable. It was a great project to start my PICO-8 journey out on.
Player Mode (X):
Take control of a really ugly bird and try not to fly into pipes. That's about it. Every 4 pipes passed increases the speed.
Neural Network Mode (Z):
Tired of playing already? Yeah, ditto. Why not watch a population of neural networks evolve over time to learn how to play, instead?
The neural network is pretty basic, but it does support multiple hidden layers and has a basic genetic algorithm included, for all your evolutionary needs.
I'm still learning Lua & PICO-8, but having a blast so far. Thanks for taking the time to read and have a good one!
Cheers,
Taco
v1.1:
-Improved graphics
-Removed jump delay
v1.2:
-Increased jump amount for added difficulty, adjusted "physics"
-Improved game instructions
-NNs now see the_pipe.x
-NNs now see pipe_speed
v1.3:
-2 pipes will now appear on screen at a time, refactored pipe "system"
-Increased starting pipe stats to make it easier at the start
-Every 4 pipes cleared, pip gap becomes smaller, distance between pipes becomes shorter, and the y position jump becomes larger
-Fixed a couple of crash bugs from OOB arrays
-Agents now get additional points from clearing a pipe, instead of just points per frame
-Agents see the closest 2 pipes to them. Pipe x, topY, and bottomY are visible for both pipes
-Increased mutation chance
-Added a fitness graph that shows the average fitness over the last 20 generations
Alright so my new Razer Kishi finally arrived.
Basically it is a clamp that fits on the left and right side of your cellphone. And it does work with Pico-8 from Firefox, sort of. The arrow keys are the rolling joystick at the top, which is not what I want. I want it to work with the arrow keys beneath that.
Is there some way I can remap these keys in Pico-8 from Firefox so they use the standard 4-way arrows ?
A mod for Celeste Classic 2, featuring new levels, mechanics, a remixed soundtrack, and more!
A sequel to Cliffside.
Download standalones here.
Update 1.1: Fixed momentum bug with springs. Small level tweaks. Fixed intro sfx.
Hey all! I'm new to Raspberry Pi and Linux so I apologize if this is a simple fix, I couldn't find it anywhere. I downloaded the Raspberry Pi Pico8, unzipped it (doesn't matter where it all has the same error) and when I try to run Pico8 I get:
Failed to execute child process "~/pico-8/pico8" (No such file or directory)
All the other files work in the folder like the manuals and such, but pico8 won't run.
Any help would be great, thanks!
NOTE: this is NOT finished, I am just posting an alpha
if you want to see a cart added, post it here
https://www.lexaloffle.com/bbs/?tid=46086
press down arrow to enable key controls, up arrow to disable them
all games:
updates
FYI:
Clicking the pico-8 logo does nothing...
Also, Comments about the launcher in general or really anything other than requests are fine.
In this Untitled Goose Game inspired demake, play as Honks the Goose and explore your tropical domain.
Complete a variety of tasks and make the isles a better place.
Features 2 endings, based on your interpretation of the 6th task.
Feedback is welcome!
Music is by Robby Duguay, you can find it yourself here: https://www.lexaloffle.com/bbs/?pid=15487#p
I was reading up on Bit Arrays to learn more secret bitwise knowledge, and stumbled onto a very clever way to count bits, via Hamming weights and a magic multiplication number. Short story is that this led to efficient fullscreen Anti-Aliasing for 1-bit screen data (colors 0 and 1 only).
Other convolution shaders are easily doable with similar techniques. This one takes every pixel and adds weighted amounts of the neighbors in this way:
1 131 1 |
You might be able to do gaussian blurs with a larger sampling neighborhood, or things like Conway's Game of Life. I'm really surprised how efficient some of these techniques are, even on pico-8. Counting every single 1 in the entire screen data is only ~6% CPU @ 30fps.
UPDATE
I cleaned up the interface, added color palettes, and optimized a bit, so this should be finished now. Managed to get a super-optimized version of the AA working via loop unrolling, but also added @Felice 's adjustment to the version with fewer tokens. There's a secret demo-like effect to play around with now too, discovered via offset bugs. Calling this experiment done!
.
UPDATE 2
Wanted to test the limits of optimization, at the cost of tokens. Original AA function is 101 tokens, faster version is 434, fastest version is 1397, but officially runs twice as fast! (9% CPU at 30fps) I don't think I can push this idea any further, and there are diminishing returns, so the middle speed is probably the best choice in most cases.
UPDATE 3
Very slight changes based on @freds72's optimization suggestion. Times and token counts are down across the board!
UPDATE 4
3%CPU@60fps improvement to the middle function for +30 tokens (or a 1% improvement for -24 tokens, commented out in the code). The max speed function becomes less relevant!
My first game made in PICO-8. Mostly was made for a Discord server I'm part of and includes a number of inside jokes but figured it was worth sharing.
Use arrow keys for movement and O+X can be used in place of Up/Down. Collect burgers and avoid rocks. Score multiplies the more burgers you can catch in one jump.
This is my crack at a checkers game with a juicy UI.
Can you beat the GrandMaster CPU?
Higher levels are still a little slow, especially in the endgame.
Enjoy!
Potential Updates
Change Log
Hey,
I am fully aware that Pico-8 does not have an android release
It does however have compiled linux binaries for x86_64 (amd64) and arm64 (aarch64)
Knowing I can't actually execute these binaries in "native" android, I started experimenting with proot-distros
I've had success running linux binaries in proot before, namely with titles like Dwarf Fortress using this person's research here:
https://www.reddit.com/r/dwarffortress/comments/r80m7y/dwarf_fortress_mobile_running_dwarf_fortress_on/
TL:DR proot debian, fill in required libraries, disable video/sound, force text rendering, launch linux binaries via box64
Obviously I can't force text rendering for pico-8 (although that would be baller if it could output to terminal using filled unicode characters and the already primitive color palette of a terminal window)
As such, my setup is similar but tweaked.
Its still a proot distro, all the libraries it claims to need are present, but I have the graphical interface piped through VNC or XSDL.
However, launching either the arm64 binary or the amd64 binary (via box64) results in the same error
SDL Error: Could not initialize UDEV ** FATAL ERROR: Unable to initialize SDL |
I've compiled SDL from source in every configuration I can find, i've found virtualized distros that claim SDL support on older versions of android... Heck I even got openGL running with hardware acceleration. All I can think of is that I am misunderstanding what part of UDEV isn't initializing.
Is it failing to initialize the GPU rules? Sound rules? Input rules? I can't figure that out and that error is the full extent of the log file that I have.
I know its not strictly an Android issue as I've seen the threads where chromeOS people have successfully run Pico-8 on chromebooks using very very similar methods, but it looks like an arm64 android issue.
I’ve been curious why smooth, textured curves were never a thing in graphics. Usually just polygons, or curves made out of polygons. After I saw this video on bezier curves, https://www.youtube.com/watch?v=aVwxzDHniEw thought I had enough tools to figure out why for myself. The video mentions two major difficulties when working with them: It’s hard to solve cubic polynomials, and estimating distance along a bezier curve isn’t precise.
If your goal is texturing them, it turns out you don’t even need to estimate distance. For any 2 bezier curves, they all share a start t value of 0 and an end t value of 1. You just have to scale up whatever t value you’re on to the height of your texture and draw your tline(), and it looks great!
The inability to solve cubic polynomials was tricky. Stack overflow has methods for drawing curves. I can’t quite figure them out, but they appear too slow for pico 8 and take a bit of space. Originally, I would just guess a T value and see if it was one pixel away, and go to the next one. Then I saw this video on newton's method https://www.youtube.com/watch?v=hHeq-SB8uVg
Which still uses guessing, but no checking and guessing again. And, if your first guess is close enough, you don’t even need to have a guess loop! I tried to put something together for that. Wowzers, you have to be really careful on how you approach +/- infinity. I had to precompute all the noteworthy points (the 2 local extrema, and the point in between) Newton's method acts up in areas of low velocity, so, I always approach the local extrema from t0, t1, or the time in between the extrema. (unless the point in between is starting to become a point of low velocity) When this cubic bezier function works, it’s such a nice smooth curve. I have it up on demo slide 2.
Picture generated in google using this equation: x-(393 x^3 +-552x^2+252x-39)/(3393x^2 + 2-552*x+252)
You can see when guesses start to go haywire. Newton's method is very delicate but very powerful for this sort of application
I also put together a quadratic(t^2) bezier function to compare with the cubic(t^3) one :
- A cubic function forming an “S” shaped curve is faster than 2 “C” shaped quadratics glued together making an S shape, but…
- There is now a whole lot of setup code for the cubic function, making it as long or longer than the solutions on stack overflow.
- The cubic bezier still uses a bit more of the cpu when zoomed out, but the quadratic scales down nicely. I think I would like to play games with several cool looping structures in the distance
- Glitches remain in the cubic one. Possibly solved by using quadratic bezier functions inside of it.
I think I will shelve the Cubic bezier for now. The Quadratic using Newton's method is nice, compact and fast, and is mostly functional.
The next step is to figure out how to rasterize it quickly. Which will be challenging with these angled tlines. Right now this demo runs at 30fps because I draw a tline at every pixel change. I hope it could be efficient enough to have a super fast racing game at 60 fps. But, I’m getting burnt out working on this. I think I’ll take a step away for a while.
The step after that is projection. From what I understand about 3d graphics, all one would have to do is project the 2 3d quadratic beziers (their 4 start and end points, and 2 control points), and one should, in theory, have a splendid textured curve in 3d space!
The demo on slide 1 uses some mode 7 type tricks to make it look like the texture is moving and going into the distance. If anyone wants to use a texture in a more standard way, I put in the function draw_textured_quad_bez() at the end (and quad_bezier_newton() above it) that accepts 6 screen control points and map tiles x,y + width/height in tiles. It mostly works pretty well! A sample is on demo slide 3.
TL;DR curved polygons?